﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using Rodunu.Movies.Data;
using Rodunu.Movies.Interfaces.Movie;

namespace Rodunu.Movies.Logic.Movie
{
    public class UserMoviesStatusLogic : StandardRepository<Contracts.UserMoviesStatus>, IUserMoviesStatus
    {
        public void SetUserMovieStatus(long userMovieId, int status)
        {
            ISession session = DBHelper.GetCurrentSession();
            IQuery query = session.GetNamedQuery("SetUserMovieStatus");
            query.SetInt64("UserMovieId", userMovieId);
            query.SetInt64("Status", status);
            query.UniqueResult();
        }
    }
}
